<?php if (!defined('THINK_PATH')) exit();?><html>
    <head>
        <title>操作员列表</title>
        <link href="<?php echo (ADMIN_CSS_URL); ?>bootstrap.css" rel="stylesheet" />
        <link href="<?php echo (ADMIN_CSS_URL); ?>lz-style.css" rel="stylesheet" />
        <script src="<?php echo (ADMIN_JS_URL); ?>jquery.js"></script>
        <script src="<?php echo (ADMIN_JS_URL); ?>bootstrap.js"></script>
        <script src="<?php echo (ADMIN_JS_URL); ?>dataTables/jquery.dataTables.js"></script>
        <script src="<?php echo (ADMIN_JS_URL); ?>dataTables/dataTables.bootstrap.js"></script>
        <script>
            $(document).ready(function () {
                $('#dataTables').dataTable({
                    paging: true,
                    searching: false,
                    showrownumber: true
                });
            });
        </script>
        <script language="JavaScript">

            $(function () {
                $('#addform').ajaxForm({
                    success: complete, // post-submit callback
                    dataType: 'json'
                });

                function complete(data) {
                    if (data.status === 1) {
                        $('#error').hide();
                        $('#success').html(data.info).show();
                    } else {
                        $('#success').hide();
                        $('#error').html(data.info).show();
                    }
                }

            });
        </script>
    </head>
    <body>
        <div class="container">
            <div class="row div_head" >
                <div class=" col-xs-6 col-sm-6 text-primary">
                    当前位置是：用户管理>用户列表
                </div>
                <div class=" col-xs-6 col-sm-3"></div>
                <div class=" col-xs-6 col-sm-3">
                    <a style="text-decoration: none;" href="/ecs/index.php/Admin/Operator/add">【添加用户】</a>
                </div>
            </div>
            <hr />
            <div class="row div_form" >
                <form action="/ecs/index.php/Admin/Operator/lst" method="post">
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="OperatorName" class="control-label">用户名</label></div>
                    <div class="col-xs-6 col-sm-3" >
                        <input type="text" id="OperatorName" name="OperatorName" class="form-control" placeholder="用户名"  value="" />
                    </div>

                    <div class="col-xs-6 col-sm-3">
                        <input type="submit" id="search"  class="btn btn-default" value="查询">
                    </div>

                </form>
                <div id="error" class="row text-danger"></div>
                <div id="success" class="row text-success"></div>
            </div>
            <hr />
            <div class="row div_content" >
                <div class="col-md-12">
                    <div class="table-responsive">
                        <table class="table table-striped table-bordered table-hover table-condensed" id="dataTables" border="1">
                            <thead>
                                <tr>
                                    <th class="div_tab_head ">序号</th>
                                    <th class="div_tab_head">用户ID</th>
                                    <th class="div_tab_head">用户名</th>
                                    <th class="div_tab_head">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <?php if(is_array($lst)): foreach($lst as $key=>$row): ?><tr>
                                    <td class="div_tab_cell"><?php echo ($key+1); ?></td>
                                    <td class="div_tab_cell"><?php echo (stripcslashes($row["operatorid"])); ?></td>
                                    <td class="div_tab_cell"><?php echo (stripcslashes($row["operatorname"])); ?></td>
                                    <td align="center" class="div_tab_cell"><div class="btn-group">
                                            <a id="edit" type="button" class="btn btn-default" href="/ecs/index.php/Admin/Operator/edit/OperatorID/<?php echo ($row["operatorid"]); ?>"><span class="glyphicon glyphicon-pencil"></span></a>
                                            <a id="delete" type="button" class="btn btn-default" href="/ecs/index.php/Admin/Operator/del/OperatorID/<?php echo ($row["operatorid"]); ?>" onClick="if (confirm('确定要删除吗？'))
                                                        return true;
                                                    else
                                                        return false;"><span class="glyphicon glyphicon-remove"></span></a>
                                        </div></td>
                                </tr><?php endforeach; endif; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

    </body>
</html>